import button from './text/button'
import formItem from './form/formItem'
import { addDraggerWidget } from './tool'
const layoutList = [
  'form'
]
// layout判断，默认是不允许嵌套的，添加限制，减轻复杂度
export function checkLayout (tag: string) {
  return layoutList.indexOf(tag) !== -1
}
// 添加默认组件
export function addDeaultList (item: any) {
  if (item.tag === 'form') {
    // 先添加formItem
    const formItem1 = {...formItem}
    debugger
    item.list.push(addDraggerWidget(formItem1))
    // const formItem1 = {...formItem}
    // addDraggerWidget(formItem1)
    // const btn1 = {...button}
    // const btn2 = {...button}
    // item.list.push(addDraggerWidget(formItem1))
    // item.list.push(addDraggerWidget(btn2))
  }
}
